<ix-modal-header
  [requiredRoles]="requiredRoles"
  [title]="isNew ? ('Install via YAML' | translate) : ('Edit App YAML' | translate)"
  [loading]="isLoading()"
></ix-modal-header>

<mat-card>
  <mat-card-content>
    <form
      class="ix-form-container"
      [formGroup]="form"
      (submit)="onSubmit()"
    >
      <ix-input
        formControlName="release_name"
        [required]="true"
        [label]="'Name' | translate"
        [readonly]="!isNew"
      ></ix-input>
      <ix-code-editor
        formControlName="custom_compose_config_string"
        [language]="CodeEditorLanguage.Yaml"
        [label]="'Custom Config' | translate"
        [tooltip]="'Custom app config in YAML format.' | translate"
        [required]="true"
      ></ix-code-editor>
      <ix-form-actions>
        <button
          *ixRequiresRoles="requiredRoles"
          type="submit"
          mat-button
          color="primary"
          ixTest="save"
          [disabled]="!form.valid || isLoading()"
        >
          {{ 'Save' | translate }}
        </button>
      </ix-form-actions>
    </form>
  </mat-card-content>
</mat-card>
